A mean value filter outputs a signal indicative of the mean value of an input signal. A proper mean value filter determines an unbiased estimate of the mean value of the input signal. An unbiased estimate is obtained when samples of the input signal are weighted equally. Mean value filters are used in a variety of applications such as bias washout, digital filter initialization, and diagnostic testing.
Bias Washout
In computerized real-time control systems, sensors provide an outputted sensor signal indicative of a sensed parameter to a controller such as a computer. Typically, the sensor signal is made up of two components. The first component is responsive to the sensed parameter. The second component is an unknown steady-state value referred to as bias. The bias component is a baseline or static value. To obtain a proper reading on the sensed parameter, the bias component must be subtracted from the sensor signal. Subtracting the bias component is referred to as DC or static value washout. For proper washout, an accurate estimate of the mean value of the bias is needed to be determined.
Digital Filter Initialization
Electronic controllers typically use digital filters for conditioning of inputted sensor signals. A digital filter analyzes discrete samples of a sensor signal. The settling time of a digital filter is minimized upon start up if the initial condition of the filter is set to the present value of the sensor signal. Due to the settling time of external filters and the possibility of electrical noise on the sensor signal, a single sample of the signal may produce a biased initial condition for the digital filter. This problem can be remedied with an unbiased estimate of the mean value of the sensor signal. Unbiased mean value estimates provide the best initial condition for digital filters.
Diagnostic Tests
The progressive deterioration of parts, such as automotive parts, may be identified by a persistent shift in the mean value of a sensor signal. While the mean value of the sensor signal is indicative of deterioration, the actual sensor signal may have superimposed on the mean value other components. For instance, with automotive parts, the other components may be related to the present vehicle operating point (i.e., accelerating, braking, turning, surface conditions, etc.) or caused by other noise sources. An unbiased estimate of the mean value of the sensor signal which filters off the operating point related components is necessary for sensing mean value shifts for proper diagnostic testing.
Conventional approaches for estimating the mean value of a real-time signal include low pass (continuous offset estimating) filters, fixed size interval batch averaging; and comparison testing of contiguous batch averages. Low pass filters continuously update an approximation of the mean value, but place more emphasis on historically recent data. In diagnostic applications, placing a greater emphasis on historically recent data is undesirable because faults are detectable only as slow shifts in the mean value of a signal. Furthermore, to approximate a long term average, a low pass filter must have an extremely low frequency pole. The low frequency pole prolongs the settling time of the filter thereby delaying the response of the diagnostic systems.
With fixed interval batch averaging, a short interval of data may provide a biased estimate of the mean value of a signal if the variance of the samples of the signal is large. A long interval of data may provide an unbiased estimate of the mean value, but unnecessarily delays the estimation when the variance of the samples is small.
A disadvantage with comparison testing of contiguous batch averages is that agreement of mean values of neighboring batch average intervals is not sufficient to guarantee that each mean value provides an unbiased mean value estimate. Additionally, in the search for contiguous batch averages whose mean values agree, historical data is forgotten rather than used for increasing the accuracy of the mean value estimation.
Disclosure Of The Invention
A general object of the present invention is to provide a method and system for generating the mean value of a signal such that a minimum signal sample size is analyzed if the sample variance is small and a larger signal sample size is analyzed if the sample variance is large.
In carrying out the above object and other objects, features, and advantages of the present invention, a method for use with a sensor for generating an output signal indicative of an estimated mean value of an input signal is disclosed.
The method includes repeating the following until a current twice mean value is within a predetermined tolerance of a previous twice mean value a consecutive number of times. First, the input signal is sampled for N (N=2, 4, 8, 16, . . . ) input signal samples. A current twice mean value of the N input signal samples is then determined. The current twice mean value is equal to one-half of the summation of two terms, the first being twice the mean value of the first N/2 input signal samples (called the previous twice mean value) and the second being twice the mean value of the last N/2 input signal samples. The current twice mean value is then compared to the previous twice mean value to determine if the current twice mean value is within a predetermined tolerance of the previous twice mean value. The current twice mean value is then stored as the previous twice mean value. The N input signal sample variable is then incremented by a power of two.
An estimate of the mean value of the input signal is generated when the current twice mean value is within a predetermined tolerance of the previous twice mean value a consecutive number of times. The estimate of the mean value is one-half of the current twice mean value.
The present invention includes a number of attendant advantages. The mean value filtering system and method iteratively extends the sample data averaging interval size until a designated consistency is found between consecutive mean estimates. This is advantageous because for inputs which have a small variance the mean value is quickly determined. For inputs which have a large variance more samples are automatically used to determine the mean value.
The above object and other objects, features, and advantages of the present invention, as well as others, are readily apparent from the following detailed description of the best mode for carrying out the invention when taken in connection with the accompanying drawings.